The Density Peak Clustering (DPC) algorithm cannot accurately select the cluster centers for the datasets with various density and complex shape. The Clustering by Local Gravitation (LGC) algorithm has many parameters which need manual adjustment. To address these issues, a new Clustering algorithm based on Local Gravity and Distance (LGDC) was proposed. Firstly, the local gravity model was used to calculate the ConcEntration (CE) of data points, and the distance between each point and the point with higher CE value was determined according to CE. Then, the data points with high CE and high distance were selected as cluster centers. Finally, the remaining data points were allocated based on the idea that the CE of internal points of the cluster was much higher than that of the boundary points. At the same time, the balanced k nearest neighbor was used to adjust the parameters automatically. Experimental results show that, LGDC achieves better clustering effect on four synthetic datasets. Compared with algorithms such as DPC and LGC, LGDC has the index of Adjustable Rand Index (ARI) improved by 0.144 7 on average on the real datasets such as Wine, SCADI and Soybean.